<template>
  <div class="upload_excel">
    <UploadExcel
      templateUrl="www.baidu.com"
      downloadShow
      :downTemp="downTemp"
      :showKey="['ID', '日期', '名字', '省区', '市区', '地址', '邮编']"
      :requireKey="['ID', '名字','邮编']"
      @excelData="excelData"
    />
  </div>
</template>

<script>
import { defineAsyncComponent, getCurrentInstance } from 'vue'
// import UploadExcel from "../../components/UploadExcel/UploadExcel.vue"
export default {
  components: {
    UploadExcel: defineAsyncComponent(() => import("../../components/UploadExcel/UploadExcel.vue"))
  },
  setup() {
    const { proxy } = getCurrentInstance()
    function downTemp(templateUrl) {
      proxy.$message.error(`${templateUrl}：没有模板，不许下载`)
    }
    function excelData(uploadData) {
      console.log(uploadData);
    }
    return {
      downTemp,
      excelData
    }
  }
}
</script>

<style>
</style>